import java.util.*;

public class a4 {
    public static  void main(String[] args) {
        double ans = 0;
        Scanner sc = new Scanner(System.in);
        int M = sc.nextInt();
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] position = new int[N];
        int[] speed = new int[N];
        for(int i = 0;i<N;i++){
            position[i] = sc.nextInt();
        }
        for(int i = 0;i<N;i++){
            speed[i] = sc.nextInt();
        }
        for(int i =1;i<N;i++){
            double time = Double.MAX_VALUE;
            if(speed[i]>speed[0]&&position[i]>position[0]){
                time = Math.min(time,(float)(2*M+position[0]-position[i]-L)/(float)(speed[i]-speed[0]));
                time = Math.min(time,(float)(position[0]-position[i]-L+M)/(speed[i]-speed[0]));
            }
            if(speed[i]<speed[0]&&position[i]>position[0]){
                time = Math.min(time,(float)(position[0]-position[i]+L)/(speed[i]-speed[0]));
                time = Math.min(time,(float)(position[0]-position[i]-M+L)/(speed[i]-speed[0]));
            }
            if(speed[i]<speed[0]&&position[i]<position[0]){
                time = Math.min(time,(float)(-2*M+position[0]-position[i]+L)/(float)(speed[i]-speed[0]));
                time = Math.min(time,(float)(position[0]-position[i]+L-M)/(speed[i]-speed[0]));
            }
            if(speed[i]>speed[0]&&position[i]<position[0]){
                time = Math.min(time,(float)(position[0]-position[i]-L)/(speed[i]-speed[0]));
                time = Math.min(time,(float)(position[0]-position[i]-L-M)/speed[i]-speed[0]);
            }
            ans = Math.max(ans,time);
        }
        System.out.printf("%.2f",ans);
    }

}